package bfunction

import (
    "gopkg.in/yaml.v2"
)

func YAML2Map(path string) (m map[interface{}]interface{}, err error) {
    content, err := FileGetContents(path)
    if err != nil {
        return
    }
    m = make(map[interface{}]interface{})
    err = yaml.Unmarshal([]byte(content), &m)
    return
}
